Communication among low-cost devices is useful in many applications. For example, in a home environment, room occupancy sensors, light switches, lamp dimmers, and a gateway to the Internet can all work together if they are in communication. Residents of the home interact with the home-control system for monitoring and control. A user could, through a user-interface, configure the home-control system to illuminate a room in a home when people are present, and sound an alarm, depending on conditions the user sets up, for example.